#ifndef __BUTTON_H__
#define __BUTTON_H__

#include "ui/view.h"

namespace MiniUI
{

class Image;
class Text;
class Button : public DeriveUIObject<Button, View>
{
public:
    Button();
    ~Button();
    void Init(const std::string& strNormal,
              const std::string& strHover,
              const std::string& strDown);
    void SetText(const std::string& strText);

protected:
    virtual void MouseEnter();
    virtual void MouseLeave();
    virtual bool MouseUp(const Type::MiniPoint& pt, MouseButton button, uint keyState, bool& bHandled);
    virtual bool MouseDown(const Type::MiniPoint& pt, MouseButton button, uint keyState, bool& bHandled);
protected:
    Image* m_pImg;
    Text* m_pText;
    std::string m_strNormal;
    std::string m_strHover;
    std::string m_strDown;
};

}

#endif